Component({
  options: {
    addGlobalClass: true
  },

  behaviors: [],

  properties: {
   
  },
  data: {
    latitude: 23.099994,
    longitude: 113.324520,
    markers: [{
      id: 1,
      latitude: 23.099994,
      longitude: 113.324520,
      name: 'T.I.T 创意园'
    }],
    covers: [{
      latitude: 23.099994,
      longitude: 113.344520,
      iconPath: '/image/location.png'
    }, {
      latitude: 23.099994,
      longitude: 113.304520,
      iconPath: '/image/location.png'
    }]
  }, // 私有数据，可用于模版渲染

  // 生命周期函数，可以为函数，或一个在methods段中定义的方法名
  attached: function () { 
    let _this = this
    wx.getLocation({
      type: 'wgs84',
      altitude:'true',
      isHighAccuracy:'true',
      success (res) {
        _this.setData({
          latitude:res.latitude,
          longitude:res.longitude
        })
        console.log(res)
      }
    })
  },
  moved: function () {  },
  detached: function () {   },

  methods: {

  }

})